#ifndef COMMONFUNC_H
#define COMMONFUNC_H	
#include <QPainter>
#include "UIElement.h"
#include "DoubleCircularLinkedList.hpp"
class CommonFunc
{
public:
	static void  drawExitBtn(QPainter* painter,const QRect& rect);

	static void drawFormName(QPainter* painter, const QRect& rect, QString name);


	static void initNode(Node<UIElement>* head, Node<UIElement>* tail, const int&displayNum);
};



#define CONVERT_PTR_TO_CLASS(vPtr,CLASS_NAME)\
    if(!vPtr){\
    return ;\
    }\
    CLASS_NAME* ptr=reinterpret_cast<CLASS_NAME*>(vPtr);

#endif // !COMMONFUNC_H


